/*
 * Copyright 2009 SHOP.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.shop.opensocial.mediated.types;

/**
 * Independent mediator for corresponding OpenSocial type
 *
 * @author Jordan Zimmerman
 */
public interface AddressMediator
{
	/**
	 * Get the country.
	 *
	 * @return the country
	 */
	public String getCountry();

	/**
	 * Get the latitude.
	 *
	 * @return latitude
	 */
	public Float getLatitude();

	/**
	 * Get the locality.
	 *
	 * @return the locality
	 */
	public String getLocality();

	/**
	 * Get the longitude of the address in degrees.
	 *
	 * @return the longitude of the address in degrees
	 */
	public Float getLongitude();

	/**
	 * Get the Postal code for the address.
	 *
	 * @return the postal code for the address
	 */
	public String getPostalCode();

	/**
	 * Get the region.
	 *
	 * @return the region
	 */
	public String getRegion();

	/**
	 * Get the street address.
	 *
	 * @return the street address
	 */
	public String getStreetAddress();

	/**
	 * Get the type of label of the address.
	 *
	 * @return the type or label of the address
	 */
	public String getType();

	/**
	 * Get the formatted address.
	 *
	 * @return the formatted address
	 */
	public String getFormatted();

	/**
	 * <p>
	 * Get a Boolean value indicating whether this instance of the Plural Field is the primary or
	 * preferred value of for this field, e.g. the preferred mailing address. Service Providers MUST
	 * NOT mark more than one instance of the same Plural Field as primary="true", and MAY choose not
	 * to mark any fields as primary, if this information is not available. Introduced in v0.8.1
	 * </p><p>
	 * The service provider may wish to share the address instance between items and primary related
	 * to the address from which this came, so if the address came from an Organization, primary
	 * relates to the primary address of the organization, and not necessary the primary address of
	 * all addresses.
	 * </p><p>
	 * If the address is not part of a list (eg Person.location ) primary has no meaning.
	 * <p/>
	 *
	 * @return true if the instance if the primary instance.
	 */
	public Boolean getPrimary();
}
